<template>
    <div class="page">
        <nav-bar title="新增银行卡" @click-left="$router.back()"></nav-bar>
        <div class="con">
            <bank-card ref="bankCardInfoRef" :shareInfo="shareInfo"></bank-card>
            <div class="box_con1">
                <van-button type="info" size="large" @click="nextStep">新增</van-button>
            </div>
        </div>
    </div>
</template>

<script>

import BankCard from "@/components/form/bank-card.vue";

export default {

    components: { BankCard },

    data() {
        return {
            shareInfo:{
                certificateName: "", // legalPersonName
                merchantProperty: "" // agentProperty
            }
        }
    },

    methods:{

        nextStep(){
            let params = this.$refs.bankCardInfoRef.submitForm();
            this.$http.collectionSaveBankInfo(params).then((respData) => {
                if (respData === false) {
                    return false;
                }
                this.$router.back();
            })
        }
    }
}
</script>

<style lang="scss" scoped>
@import "@/assets/color.scss";

.page{
    .box_con1 {
        padding: 20px 10px;
    }
}
</style>